package com.woniu.his.sms.app.apiImpl;

import com.woniu.his.result.Result;
import com.woniu.his.sms.client.SmsPermissionClient;
import com.woniu.his.sms.service.PermissionService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @version: java version 1.8
 * @Author: ZJH
 * @description:
 * @date: 2022-12-02 14:36
 */
@RestController
@RequestMapping("sms")
@Slf4j
public class SmsPermissionApiImpl implements SmsPermissionClient {

    @Resource
    private PermissionService permissionService;

    @Override
    public Result<List<String>> getUrl(Long staffId) {
        log.info("查询员工权限员工id：{}",staffId);
        List<String> urls = permissionService.getUrl(staffId);
        return Result.getInstanceList(String.class).setData(urls);
    }
}
